﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace NinjaToolbox.SubComponentModule.Example
{
    [TargetSubComponent(typeof(SE2_Move))]
    [SubComponentPath("Example2/Move")]
    [Rename("Move")]
    public class SE2_Move_Model : SubComponentModelBase
    {
        public float moveSpeed = 1f;
        public string moveAnimKey = "";


        protected override void EditorSerialize(UnionSerializeWriter serializeWriter)
        {
            base.EditorSerialize(serializeWriter);

            serializeWriter.Write(moveSpeed);
            serializeWriter.Write(moveAnimKey);
        }

        protected override void EditorDeserialize(UnionSerializeReader serializeReader)
        {
            base.EditorDeserialize(serializeReader);

            moveSpeed = serializeReader.ReadFloat();
            moveAnimKey = serializeReader.ReadString();
        }
    }
}
